<?php

require_once 'PHPUnit/Framework.php';

CCore::Using('mime.message');

/**
 * Test class for CCoreMimeMessageCollection.
 */
class CCoreMimeMessageCollectionTest extends PHPUnit_Framework_TestCase
{

	/**
	 * @var CCoreMimeMessageCollection
	 */
	protected $object;

	/**
	 * This method is called before a test is executed.
	 */
	protected function setUp()
	{
		$this->object = new CCoreMimeMessageCollection();
	}

	public function testAdd()
	{
		$oMimeMessage = new CCoreMimeMessage();
		$this->object->Add($oMimeMessage);

		$this->assertEquals(1, $this->object->Count());

		$this->object->Clear();
		$this->assertEquals(0, $this->object->Count());
	}
}
